import request from '@/config/axios'
import type { Dayjs } from 'dayjs';

/** 教练视频介绍信息 */
export interface CoachVideo {
          id: number; // ID
          coachId?: number; // 教练ID
          videoUrl?: string; // 视频Url
          auditStatus?: number; // 审核状态（字典：business_audit_status）
  }

// 教练视频介绍 API
export const CoachVideoApi = {
  // 查询教练视频介绍分页
  getCoachVideoPage: async (params: any) => {
    return await request.get({ url: `/business/coach-video/page`, params })
  },

  // 查询教练视频介绍详情
  getCoachVideo: async (id: number) => {
    return await request.get({ url: `/business/coach-video/get?id=` + id })
  },

  // 新增教练视频介绍
  createCoachVideo: async (data: CoachVideo) => {
    return await request.post({ url: `/business/coach-video/create`, data })
  },

  // 修改教练视频介绍
  updateCoachVideo: async (data: CoachVideo) => {
    return await request.put({ url: `/business/coach-video/update`, data })
  },

  // 删除教练视频介绍
  deleteCoachVideo: async (id: number) => {
    return await request.delete({ url: `/business/coach-video/delete?id=` + id })
  },

  /** 批量删除教练视频介绍 */
  deleteCoachVideoList: async (ids: number[]) => {
    return await request.delete({ url: `/business/coach-video/delete-list?ids=${ids.join(',')}` })
  },

  // 导出教练视频介绍 Excel
  exportCoachVideo: async (params) => {
    return await request.download({ url: `/business/coach-video/export-excel`, params })
  },
}